﻿using System;
using System.Collections.Generic;
using System.Text;
using RouterControl.Whs;

namespace RouterControl.Service
{
    public abstract class RouterSlave
    {
        protected readonly log4net.ILog _log;
        private volatile CommonInternetGateway _router;

        protected CommonInternetGateway Router
        {
            get { return _router; }
        }

        public RouterSlave()
        {
            _log = log4net.LogManager.GetLogger(GetType());
        }

        public virtual void OnDataUpdated()
        {

        }

        public virtual void OnRouterChanged(CommonInternetGateway newRouter)
        {
            _router = newRouter;
        }
    }
}
